package com.chiangleoi.appointment.utils;

import java.util.LinkedHashMap;
import java.util.Random;

public class HttpUtils {

    public static void doHttp(String data) {
        try {
            HttpClientUtils httpClientUtils = new HttpClientUtils();
            String url = "https://jntyzx.cn:8443/GYM-JN/multi/Subscribe/addSubscribe";
            LinkedHashMap<String, String> headers = new LinkedHashMap<>();
            headers.put("Content-Type", "application/json");
            Random random = new Random(1000);
            int i = random.nextInt();
            headers.put("User-Agent", "Mozilla/5.0(Windows NT 10.0;Win64;x64)AppleWebKit/537.36(KHTML,like Gecko) Chrome/128.0.0.0 Safari/" + i);
            String ret = httpClientUtils.sendPOST(url, data, headers);

            System.out.println("ret:" + ret);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


}
